import request from './request'

export function addOrder(data) {
    return request({
        url: '/order/addOrder',
        method: 'post',
        data
    })
}

export function getOrders(data) {
    return request({
        url: '/order/getUserOrders',
        method: 'get',
        params: data
    })
}

/**
 * 支付订单
 * @param {*} id 
 * @returns 
 */
export function payOrder(id) {
    return request({
        url: '/order/pay/' + id,
        method: 'post'
    })
}